package com.h3c.ptability.task;

import com.h3c.ptability.service.IBdPublicCalendarService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@JobHandler(value="syncPublicCalendarHandler")
@Component
public class SyncPublicCalendarHandler extends IJobHandler {

    @Resource
    private IBdPublicCalendarService iBdPublicCalendarService;

    @Override
    public ReturnT<String> execute(String param) {
        XxlJobLogger.log("syncPublicCalendarHandler,请求入参：", param);
        iBdPublicCalendarService.syncBdPublicCalendar();
        XxlJobLogger.log("执行结束");
        return SUCCESS;
    }
}
